<template>
  <div>
    <h1>个人主页</h1>
    {{this.$store.state.a}}
    {{this.$store.state.b}}
    <Details :name="name" :msg="msg" @receive="receive" />
    <p>
        {{receiveMsg}}
    </p>
    <p>
       年龄:{{this.$store.getters.changeAge}}
    </p>
  </div>
</template>

<script>
import Details from "@/components/Details.vue";
export default {
  components: { Details },
  data() {
    return {
        name:"张三",
        msg:"这是对张三的描述",
        receiveMsg:""
    }
  },
  
  methods:{
    receive(res){
        console.log(res);
        this.receiveMsg = res;
    }
  },

};
</script>

<style scoped>
</style>